<?php

class Model_Listing_AddAnAdLocal extends Model_Listing implements Model_Listing_Interface
{
    protected static  $_collection = 'listing';


    protected static $_requirements = array(
//     //   'em'  => array('Required', 'Validator:EmailAddress'), //Email
//        'cb'  => array('Array'), //exteriorcolor
//        'fl'  => array('Array'), //files
//        'jl'  => array('Array'), //joblocation
//        'et'  => array('Array'), //employmenttype
//        'cl'  => array('Array'), //careerlevel
//        'rs'  => array('Array'), //residentstatus
    );

    protected $_category = array();

    public function __construct($data = array(), $config = array()) {
        static::$_transcript = array_merge(array(
            'et' => 'employmenttype',
            'sr' => 'salary',
            'srh' => 'salary_hour',
            'ne' => 'negotiable',
            'jl' => 'joblocation',
            'rs' => 'residentstatus',
            'cl' => 'careerlevel',
            'jf' => 'jobfunction',
            'jc' => 'jobcategory',
            'ye' => 'yearexperience',
            'ed' => 'education',
            'fg' => 'freshgraduate',
            'cb' => 'companybenefits',
            'fl' => 'files',
            'cn_en' => 'company_name_en',
            'cn_tc' => 'company_name_tc',
            'jd_en' => 'job_desc_en',
            'jd_tc' => 'job_desc_tc',
            'tl_en' => 'title_en',
            'tl_tc' => 'title_tc',
         ), static::$_transcript);
        parent::__construct($data, $config);
    }

	public static function getTranslationFormField()
    {
        $arr = array(
			'tl_en' =>'text',
			'cn_en' =>'text',
			'cs_en' =>'textarea',

		);

		return $arr;
    }

    public function postAnAddForm($options = array()) {
        $options = array_merge($options, array('category' => $this->category));
        return new Listing_Form_AddAnAdLocalForm($options);
    }
    
    public function getAdDetailPartialName()
    {
        return 'customization/add-an-ad-local.phtml';
    }

    public function getAdPreviewPartialName()
    {
        return $this->getAdDetailPartialName();
    }
    
}
